package plus.easydo.starter.log.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import plus.easydo.starter.oauth.core.utils.Oauth2Utils;

/**
 * 默认获取用户信息服务
 * @author laoyu
 * @version 1.0
 */
public class DefaultSystemLogUserServer implements SystemLogUserServer {

    Logger logger = LoggerFactory.getLogger(DefaultSystemLogUserServer.class);

    public DefaultSystemLogUserServer() {
        logger.warn("The user information acquisition logic of the log service is not defined. The default user information is used to obtain the log service");
    }

    @Override
    public String getUserId() {
        return Oauth2Utils.getUserIdString();
    }

    @Override
    public String getUserName() {
        return Oauth2Utils.getUserName();
    }

}
